package com.bbzn.device.client.dto.api;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
public class ResultResponse<T> {

    private T data;

    public ResultResponse() {
    }

    public ResultResponse(T data) {
        super();
        this.data = data;
    }

    /**
     * 成功返回结果
     */
    public static <T> ResultResponse<T> setSuccess(T data) {
        return new ResultResponse<T>(data);
    }

    /**
     * 失败返回结果
     */
    public static <T> ResultResponse<T> setError(T data) {
        return new ResultResponse<T>(data);
    }

}
